/*
 * @Author: your name
 * @Date: 2021-09-22 09:13:34
 * @LastEditTime: 2021-09-22 09:25:11
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \数据结构\队列\数组队列\main.c
 */
#include<stdbool.h>
#include<stdio.h>
#include "queue.c"
int main(){
    QUEUE* q = createQueue(5);

    // 5 0 0
    printf("size=%d front=%d rear=%d\n",q->queueSize,q->front,q->rear);

    EnQueue(q,1);
    EnQueue(q,2);
    EnQueue(q,3);
    EnQueue(q,4);
    EnQueue(q,5);

    // 5 0 5
    printf("size=%d front=%d rear=%d\n",q->queueSize,q->front,q->rear);
    printf("length:%d\n",QueueLength(q));

    DeQueue(q);
    DeQueue(q);

    // 5 2 5
    printf("size=%d front=%d rear=%d\n",q->queueSize,q->front,q->rear);

    EnQueue(q,1);
    EnQueue(q,2);

    // 5 2 1
    printf("size=%d front=%d rear=%d\n",q->queueSize,q->front,q->rear);

    // EnQueue(q,3);
    // DeQueue(q);
    // DeQueue(q);
    // DeQueue(q);
    // DeQueue(q);
    // DeQueue(q);
    // DeQueue(q);
    printf("length:%d\n",QueueLength(q));

    //释放
    freeQueue(q);
    return 0;
}